import React, { useState, useEffect } from 'react'
import { Tabs, ProductCard, Cell, Button } from 'react-vant'
import { useNavigate } from 'react-router-dom';
export default function Writeping(props) {
    const navigate = useNavigate();
    return (
        <div>
            <ProductCard
                title={props.ele.title}
                price={props.ele.price}
                desc={props.ele.desc}
                currency={'￥'}
                origin-price={'￥' + props.ele.price}
                thumb={props.ele.img}
            />
            <hr style={{ border: '1px dashed  #ccc' }}></hr>
            <Cell title='' value={<Button plain type='primary' color='red'  onClick={()=>(navigate('/fabuping',{state:{i:props.ele}}))}
            >写评价</Button>}>
            </Cell>
        </div>
    )
}
